Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
class ActivateData(val userId: String)

Identifies the user opening a shift with Terminal.activate.

Link copied to clipboard
Link copied to clipboard
class Amount(val value: Long, val currency: Int)

Amount to charge, in minor units, together with its currency.

Link copied to clipboard
class Async<T>

Result and callbacks for asynchronous connection, shift and terminal administration operations. Payments use TransactionHandle; pre-transactions use PreTransactionHandle.

Link copied to clipboard
class CardInfo

Card information returned with a completed purchase.

Link copied to clipboard
Link copied to clipboard

Cardholder display update pushed by the terminal while a purchase is running (for example "insert card", "processing"), delivered to Terminal.Builder.onDisplayContent - independent of TerminalState/Terminal.Builder.onStateChanged, which only ever tracks connection/shift lifecycle, never per-transaction display updates.

Link copied to clipboard

Reason why a purchase did not succeed.

Link copied to clipboard

Connection settings accepted by Terminal.Builder.connectionOptions. Use RemoteConnectionOptions for an HTTP(S) terminal service.

Link copied to clipboard
interface ILogger

Receives log messages from the SDK, set via Terminal.Builder.logger.

Link copied to clipboard

Severity passed to ILogger.log.

Link copied to clipboard

Loyalty card data collected during a pre-transaction wait, available through PreTransactionResult.getLoyaltyData.

Link copied to clipboard

What to collect ahead of the actual payment amount being known, passed to Terminal.startPreTransaction/Terminal.startPreTransactionAsync. See PreTransactionAction for the individual data points that can be requested.

Link copied to clipboard

Fluent, lambda-friendly builder passed into the configurer of Terminal.startPreTransactionAsync - mirrors TransactionCall, but for the background wait started ahead of a transaction instead of the transaction itself.

Link copied to clipboard

Returned by Terminal.startPreTransactionAsync. Wraps the background wait's eventual outcome so callers that want to wait synchronously can do so with join/get - mirrors TransactionHandle, but for the pre-transaction wait, and offers the same getResult/cancel as PreTransactionProgress on the sync side.

Link copied to clipboard

Handle returned immediately by Terminal.startPreTransaction.

Link copied to clipboard
class PreTransactionRequest @JvmOverloads constructor(actions: Set<PreTransactionAction> = java.util.Set.of(), val transactionId: String = java.util.UUID.randomUUID().toString())

What to collect ahead of the actual payment amount being known, passed to Terminal.startPreTransaction/Terminal.startPreTransactionAsync.

Link copied to clipboard
Link copied to clipboard

Details about a failed or declined payment.

Link copied to clipboard
Link copied to clipboard
class Receipt

A receipt produced by the terminal.

Link copied to clipboard
class RemoteConnectionOptions @JvmOverloads constructor(val url: String, val tokenUrl: String, val clientId: String, val clientSecret: String, val tenantId: String? = null, val insecureTls: Boolean = false, val enableKeepAlive: Boolean = true, val keepAliveInterval: Duration = Duration.ofSeconds(60)) : IConnectionOptions

Connects over HTTP(S) to a terminal-service deployment, authenticating with the OAuth2 client-credentials grant against tokenUrl - required, since Terminal.connect always needs a token to reach the terminal service.

Link copied to clipboard
Link copied to clipboard

What to run with Terminal.startServiceRequest/Terminal.startServiceRequestAsync - build one via configure, configureOnly or initialiseOnly, each only exposing the parameters that make sense for that kind of service request (for example, acquirerId has no meaning for configureOnly and is therefore not accepted there at all).

Link copied to clipboard

Result of Terminal.startServiceRequest/Terminal.startServiceRequestAsync. Contains the combined receipts of whichever step(s) ran (configuration and/or initialisation).

Link copied to clipboard

Which party needs to sign a payment receipt. A null TransactionResult.signatureRequirement means no information was reported; NONE explicitly means no signature is required.

Link copied to clipboard
class Terminal

Entry point of the APA POS SDK. Create one instance per terminal and reuse it; instances are thread-safe.

Link copied to clipboard

Raised when an operation could not be completed, for example because the terminal service was unreachable, rejected the credentials or sent an unreadable response.

Link copied to clipboard

Timeouts, receipt formatting and payment settings for a Terminal.

Link copied to clipboard

Local connection/shift lifecycle state, as tracked by Terminal.getState and reported to Terminal.Builder.onStateChanged.

Link copied to clipboard

The requested operation is unavailable. Thrown before any request is sent. Repeating the same call does not resolve this error.

Link copied to clipboard

Configures transaction callbacks. Completion is reported only after the commit decision is resolved.

Link copied to clipboard

Tracks a transaction until its final outcome. join/get and onComplete receive the same result. A deferred transaction remains pending until commit or rollback resolves the decision. Use onWaitingForCommit for authorisation data; do not wait on join before making that decision.

Link copied to clipboard
class TransactionRequest @JvmOverloads constructor(val amount: Amount, val type: TransactionType = TransactionType.PURCHASE, val cashbackAmount: Amount? = null, val pan: String? = null, val expiryDate: String? = null, val cvc2: String? = null, val salesId: String? = null, val transactionId: String = UUID.randomUUID().toString())

Payment request passed to Terminal.startTransaction or Terminal.startTransactionAsync. Use the factory for the payment type, such as purchase or purchaseWithCashback. The constructor enforces the same rules as the builders. Reversals use ReversalRequest.

Link copied to clipboard

Result shared by synchronous and asynchronous transactions, commit, rollback and recovery. status is the transaction state; FAILED includes declines and aborts, not just technical errors. A WAITING_FOR_COMPLETION reservation requires a separate completion operation. Card and authorisation details are preserved when confirming a commit. Missing recovery data remains null. authorisedAt and completedAt describe distinct events.

Link copied to clipboard

Current outcome of a transaction, as reported by Terminal.fetchTransactionStatus.

Link copied to clipboard

Result of Terminal.fetchTransactionStatus: the current, already-persisted state of a transaction, resolved by its ECR transaction id without repeating or affecting it in any way.

Link copied to clipboard
sealed class TransactionStep

A pending authorisation or a transaction result.

Link copied to clipboard

Whether the transaction needs a decision or has an outcome.

Link copied to clipboard

Payment type. Use a TransactionRequest factory to select one. REVERSAL uses the separate Terminal.startReversal operation.

Link copied to clipboard

Authorisation awaiting a commit/rollback decision. Call exactly one of commit or rollback. Both block until the service reports the outcome or the configured commit timeout expires.

Link copied to clipboard

Passed to TransactionCall.onWaitingForCommit once the terminal has approved or declined a transaction started with autoCommit = false. Return a WaitingForCommitResult to commit, roll back, or defer the decision. Also available from UncommittedTransactionResult.getTrxData.

Link copied to clipboard

Decision returned from TransactionCall.onWaitingForCommit: commit, roll back, or leave the transaction pending for a later TransactionHandle.commit or TransactionHandle.rollback.